-- @owner: @songjing20
-- @date: 2023-1-14
-- @testpoint: desc/describe分析select...into语句
-- @modified by @zou_jialiang050 2023/06/27:代码变更，修改部分预期结果

--step1:建表插入数据;expect:成功
drop table if exists t_describe_0071 cascade;
create table t_describe_0071(id int, c_clob varchar(10), index(id));
insert into t_describe_0071 values(1, 'a'), (1, 'b'), (1, 'c'), (1, 'd');

--step2:事务中分析select...into执行计划;expect:打印执行计划
begin;/
desc analyze select * into t_describe_0071_new from t_describe_0071;
rollback;

start transaction;
describe analyze with temp_tb as (select c_clob from t_describe_0071) select * into t_describe_0071_new from temp_tb as s1;
end;
select * from t_describe_0071_new order by 1;

--step3: 清理环境; expect: 成功
drop table if exists t_describe_0071, t_describe_0071_new cascade;